<template>
  <div class="header-bar">
    <div class="head-item headers">
      <slot name="backBtn">
        <i v-if="isShowBack" @click="$router.back()" class="iconarrow_back"></i>
      </slot>
    </div>
    <div class="head-item title">{{ title }}</div>
    <div class="head-item others">
      <slot name="other">
        <span></span>
      </slot>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    title: {
      type: String,
      default: ""
    },
    isShowBack: {
      type: Boolean,
      default: true
    }
  },
  methods: {}
};
</script>

<style lang="stylus" scoped>
.header-bar {
  position: relative;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  padding: 0 8px;
  justify-content: space-between;
  background: #fff;

  .head-item {
    width: 20%;
  }

  .headers {
    // position: absolute;
    // top: 13px;
    // left: 10px;
    font-family: SourceHanSansCN-Normal;
    font-size: 16px;
    color: #444444;
    letter-spacing: -0.38px;
    text-align: left;

    .iconarrow_back {
      color: #333333;
      font-size: 20px;
    }
  }

  .title {
    font-size: 17px;
    font-family: PingFangSC-Medium;
    font-weight: 500;
    color: rgba(51, 51, 51, 1);
    text-align: center;
    width: 60%;
  }

  .others {
    text-align: right;
    font-size: 15px;
    font-family: PingFangSC-Regular;
    font-weight: 400;
    color: rgba(51, 51, 51, 1);
    margin-right: 12px;
  }

  &::after {
    position: absolute;
    bottom: 0px;
    left: 0px;
    content: ' ';
    height: 1px;
    background: rgba(221, 221, 221, 1);
    width: 100%;
  }
}
</style>
